package com.sysman.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;

import com.sysman.mapper.UserinfoMapperCustom;
import com.sysman.mapper.UserlogininfoMapper;
import com.sysman.mapper.UserlogininfoMapperCustom;
import com.sysman.po.Userinfo;
import com.sysman.po.UserinfoCustom;
import com.sysman.po.Userlogininfo;
import com.sysman.po.UserlogininfoCustom;
import com.sysman.service.PatientService;

/** 
* @author  LTT-AH-ZY E-mail: 
* @date 创建时间：2017年8月8日 上午11:37:30 
* @version 1.0 
* @parameter 参数及其意义
* @since 最早使用该方法/类/接口的JDK版本 
* @since  
* @return  
*/

public class PatientServiceImpl implements PatientService{
	@Autowired
	private UserlogininfoMapperCustom userlogininfoMapperCustom;
	@Autowired
	private UserinfoMapperCustom userinfoMapperCustom;
	@Autowired
	private UserlogininfoMapper userlogininfoMapper;
	@Override
	public List<UserlogininfoCustom> InitUserlogininfoList(UserlogininfoCustom userlogininfoCustom) throws Exception {
		// Init userlogininfo List
		return userlogininfoMapperCustom.InitUserlogininfoList(userlogininfoCustom);
	}
	@Override
	public UserinfoCustom finduserinfoDetails(UserinfoCustom userinfoCustom) throws Exception {
		// find userinfo by userloginid
		return userinfoMapperCustom.finduserinfoDetails(userinfoCustom);
	}
	@Override
	public Userlogininfo finduserlogininfoDetails(Integer userloginid) throws Exception {
		// select * from userloiginfo by userloginid
		return userlogininfoMapper.selectByPrimaryKey(userloginid);
	}
	@Override
	public List<UserlogininfoCustom> InitUserlogininfoExamineList(UserlogininfoCustom userlogininfoCustom)
			throws Exception {
		// Init userlogininfo Examine List
		return userlogininfoMapperCustom.InitUserlogininfoExamineList(userlogininfoCustom);
	}
	@Override
	public int updateUserlogininfoType(Integer userloginid, UserlogininfoCustom userlogininfoCustom) throws Exception {
		userlogininfoCustom.setUserloginid(userloginid);
		return userlogininfoMapper.updateByPrimaryKeySelective(userlogininfoCustom);
	}

}
